package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.constant.StudentConstants;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.domain.entity.SysUser;
import com.ruoyi.common.exception.ServiceException;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.bean.BeanValidators;
import com.ruoyi.common.utils.security.Md5Utils;
import com.ruoyi.teacher.domain.SysCourse;
import com.ruoyi.teacher.mapper.SysCourseMapper;
import com.ruoyi.teacher.service.ISysCourseService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.common.core.text.Convert;

import javax.validation.Validator;

/**
 * sysCourseService业务层处理
 * 
 * @author ruoyi
 * @date 2022-01-13
 */
@Service
public class SysCourseServiceImpl implements ISysCourseService 
{
    private static final Logger log = LoggerFactory.getLogger(SysCourseServiceImpl.class);
    @Autowired
    protected Validator validator;
    @Autowired
    private SysCourseMapper sysCourseMapper;

    /**
     * 查询sysCourse
     * 
     * @param id sysCourse主键
     * @return sysCourse
     */
    @Override
    public SysCourse selectSysCourseById(Long id)
    {
        return sysCourseMapper.selectSysCourseById(id);
    }

    /**
     * 查询sysCourse列表
     * 
     * @param sysCourse sysCourse
     * @return sysCourse
     */
    @Override
    public List<SysCourse> selectSysCourseList(SysCourse sysCourse)
    {
        return sysCourseMapper.selectSysCourseList(sysCourse);
    }

    /**
     * 新增sysCourse
     * 
     * @param sysCourse sysCourse
     * @return 结果
     */
    @Override
    public int insertSysCourse(SysCourse sysCourse)
    {
        return sysCourseMapper.insertSysCourse(sysCourse);
    }

    /**
     * 修改sysCourse
     * 
     * @param sysCourse sysCourse
     * @return 结果
     */
    @Override
    public int updateSysCourse(SysCourse sysCourse)
    {
        return sysCourseMapper.updateSysCourse(sysCourse);
    }

    /**
     * 批量删除sysCourse
     * 
     * @param ids 需要删除的sysCourse主键
     * @return 结果
     */
    @Override
    public int deleteSysCourseByIds(String ids)
    {
        return sysCourseMapper.deleteSysCourseByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除sysCourse信息
     * 
     * @param id sysCourse主键
     * @return 结果
     */
    @Override
    public int deleteSysCourseById(Long id)
    {
        return sysCourseMapper.deleteSysCourseById(id);
    }


}
